//
//  LEEButton.swift
//  SinaWeibo
//
//  Created by 李江波 on 2016/11/21.
//  Copyright © 2016年 lijiangbo. All rights reserved.
//

import UIKit

var btnImageWidth: CGFloat = 80
var btnHight: CGFloat = 110


class LEEButton: UIButton {

    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.titleLabel?.font = UIFont.systemFont(ofSize: 14)
        self.titleLabel?.textAlignment = .center
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func titleRect(forContentRect contentRect: CGRect) -> CGRect {
        
        return CGRect(x: 0, y: btnImageWidth, width: btnImageWidth, height: btnHight - btnImageWidth)
    }
    
    override func imageRect(forContentRect contentRect: CGRect) -> CGRect {
        
        return CGRect(x: 0, y: 0, width: btnImageWidth, height: btnImageWidth)
    }

}
